﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace JustPlus
{
    /// <summary>
    /// MiniPanel.xaml 的交互逻辑
    /// </summary>
    public partial class MiniPanel : UserControl
    {
        private MainWindow mwnd = (MainWindow)Application.Current.MainWindow;
        public static bool BeforeMini = false;//防止切换到完整模式时鼠标在OpearationPanel里引发Mouse_move事件
        public MiniPanel()
        {
            InitializeComponent();
        }

        //完整模式
        private void image6_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            BeforeMini = true;
            mwnd.stackPanel1.Children.Clear();
            mwnd.stackPanel1.Children.Add(mwnd.stackPanel2);
            mwnd.stackPanel1.Children.Add(mwnd.stackPanel3);
            mwnd.Height = 256;
            mwnd.Width = 512;
            mwnd.Topmost = false;
            mwnd.Left = SystemParameters.WorkArea.Width / 2 - 256;
            mwnd.Top = SystemParameters.WorkArea.Height / 2 - 128;
            mwnd.bkimage.ImageSource = new BitmapImage(new Uri(@"pack://application:,,,/JustPlus;component/Images/background"
            + (PlayerPanel.picno).ToString() + @".jpg", UriKind.Absolute));
        }
    }
}
